package projectdemo01.user;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:咭咭熊
 * Date:2021 - 09 - 23
 * Time:19:28
 */

import projectdemo01.operation.*;

import java.util.Scanner;

/***
 * 普通用户
 */
public class NormalUser extends User {

    public NormalUser(String name) {
        super(name);
        this.operations = new IOperation[]{
                new ExitOperation(),
                new FindOperation(),
                new BorrowOperation(),
                new ReturnOperation()

        };
    }

    @Override
    public int menu() {

        Scanner scanner = new Scanner(System.in);
        System.out.println("普通用户的菜单");
        System.out.println("==============================");
        System.out.println("hello " +  this.name + "欢迎来到图书管理系统");
        System.out.println("1.查找书籍");
        System.out.println("2.借阅图书");
        System.out.println("3.归还图书");
        System.out.println("0.退出系统");
        System.out.println("==============================");
        int choice = scanner.nextInt();
        return choice;
    }


}
